#!/bin/sh

# This script is used to generate/update mock objects for testing

docker-compose -f docker-compose.yml -f docker-compose.dev.yml \
           exec api go generate ./... 

docker-compose -f docker-compose.yml -f docker-compose.dev.yml \
	       exec api mockery --name Backend --dir ../pkg/envs/ --output ../pkg/envs/mocks --filename envs.go

docker-compose -f docker-compose.yml -f docker-compose.dev.yml \
	       exec api mockery --name Clock --dir ../pkg/clock/ --output ../pkg/clock/mocks --filename clock.go

docker-compose -f docker-compose.yml -f docker-compose.dev.yml \
	       exec api mockery --name Uuid --dir ../pkg/uuid/ --output ../pkg/uuid/mocks --filename uuid.go

docker-compose -f docker-compose.yml -f docker-compose.dev.yml \
	exec api mockery --name Client --dir ../pkg/api/internalclient --output ../pkg/api/internalclient/mocks --filename internalclient.go

docker-compose -f docker-compose.yml -f docker-compose.dev.yml \
	exec api mockery --name Client --dir ../pkg/api/client --output ../pkg/api/client/mocks --filename client.go

docker-compose -f docker-compose.yml -f docker-compose.dev.yml \
	exec ssh mockery --name Session --output ./mocks --filename session.go --srcpkg github.com/gliderlabs/ssh
